
package com.plian.system.service.fr.adjustment.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.plian.system.entity.fr.adjustment.AdjustmentValue;
import com.plian.system.mapper.fr.adjustment.AdjustmentValueMapper;
import com.plian.system.service.fr.adjustment.IAdjustmentValueService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 表格值 服务实现类
 *
 * @author jianglei
 * @since 2021-09-15
 */
@Service
@AllArgsConstructor
public class AdjustmentValueServiceImpl extends ServiceImpl<AdjustmentValueMapper, AdjustmentValue> implements IAdjustmentValueService {

    @Override
    public AdjustmentValue findValueByLinkId(String linkId, int lineNumber, String columnId) {
        return getOne(Wrappers.<AdjustmentValue>lambdaQuery().eq(AdjustmentValue::getLinkId, linkId)
                .eq(AdjustmentValue::getOrderNumber, lineNumber)
                .eq(AdjustmentValue::getColumnId, columnId)
                .orderByAsc(AdjustmentValue::getOrderNumber));
    }
}
